/* vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
/* Copyright (C) 2012 Zongyou Yao. All rights reserved.     */

#undef assert

/**
 * Raises assert_failed if e is zero. Syntactically, assert(e) is an
 * expression. If NDEBUG is defined when assert.h is inclued, asserts
 * are disabled.
 */
#ifdef NDEBUG
    #define assert(e) ((void)0)
#else
    #include "except.h"
    extern void assert(int e);
    #define assert(e) ((void)((e) || (RAISE(assert_failed), 0)))
#endif
